<script type="text/javascript" src="<?php echo JSPATH; ?>lightbox/js/prototype.js"></script>
<script type="text/javascript" src="<?php echo JSPATH; ?>lightbox/js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="<?php echo JSPATH; ?>lightbox/js/lightbox.js"></script>
<link rel="stylesheet" href="<?php echo JSPATH; ?>lightbox/css/lightbox.css" type="text/css" media="screen" />

<?php
    if (!defined('APPPATH')) exit('No direct script access allowed');

    require_once(APPPATH.'libraries/utils/translation/class.translation.php');
    
    if(isset($_GET['lang']))
        $translate = new Translation($_GET['lang'], true);
    else {
        if(!empty($lang))
            $translate = new Translation($lang, true);
        else
            $translate = new Translation('en', true);
    }
?>

<h2><?php $translate->__('View uploaded images'); ?></h2>
    <table cellpadding="0" cellspacing="0" width="100%">
        <thead>
            <tr>
                <th><?php $translate->__('Name'); ?></th>
                <th><?php $translate->__('Options'); ?></th>
            </tr>
        </thead>
        <tbody>
            <?php
                if(!empty($images)) {
                    foreach($images as $key => $image) {
            ?>
                    <tr>
                        <td><?php echo $image['name'] ?></td>
                        <td><a href="<?php echo base_url() . "public/files/images/" . $image['url'] ?>" rel="lightbox" title="<?php echo $image['name'] ?>"><?php $translate->__('view'); ?></a> | <a href="<?php echo site_url() . "/admin/multimedia_controller/delete/" . $image['multimedia_id'] ?>"><?php $translate->__('delete'); ?></a></td>
                    </tr>
            <?php
                    }
                }
            ?>
        </tbody>
    </table>